spaceharderfandomcom-20200214-history
Tutorial 1: Getting the Code
This tutorial will tell you how to get the code and start contributing to the project. If you've already worked on a GCS project, and know how to use Tortoise Hg, you can just skim for the relevant repository addresses and passwords. Step 1: Get The Required Software In order to contribute to the code, you will need to download the following software (Note that if you're a programmer, you're required to use Microsoft WIndows): : For Programmers *Tortoise Hg http://tortoisehg.bitbucket.org/. This is required to get the Mercurial repository and contribute code. *Microsoft Visual Studio, or Visual C#. If you are a CMU student, you can get Visual Studio from Microsoft Dreamspark. https://www.dreamspark.com/default.aspx. If you can't seem to get it from dreamspark, just try Visual C# express. http://www.microsoft.com/visualstudio/en-us/products/2010-editions/visual-csharp-express. This is required to write code. *Microsoft XNA 4.0. You can get this from dreamspark, or from here: http://www.microsoft.com/download/en/details.aspx?id=23714 *You might also want to get XML Notepad 2007: http://www.microsoft.com/download/en/details.aspx?id=7973. This is very useful for editing units and maps for the game. : For Arists / Designers *Tortoise Hg http://tortoisehg.bitbucket.org/. This is required to get the Mercurial repository and contribute code. *You might also want to get XML Notepad 2007: http://www.microsoft.com/download/en/details.aspx?id=7973. This is very useful for editing units and maps for the gam *If you want to run the code and see your designs in action, you might also want to get all the things on the programmer's list. Step 2: Check Out The Repository Once you've gotten Tortoise Hg, right click in a location where you want the code to reside. Usually, this is in the My Documents/ Visual Studio 2010 folder. Create a new folder in there called "SpaceGame2Repository." When you right click on the folder, selet "TortoiseHg > Clone ..." For the source path, enter: https://SpaceRTSTeam@bitbucket.org/mklingen/spacerts And press the button "Clone." This will put a copy of the repository on your computer. Email me for the password. Step 3 (For Prorammers): Open the Visual Studio Project, Compile and Run the Code Once you've cloned the repository, you should see four directories inside SpaceGame2Repository: "Farseer Physics Engine 3.3 XNA", "Mercury Particle Engine 3.1 for XNA 4.0 (Binaries), "Neoforce", and "SpaceRTS." These are the base folders for all the projects in the game engine. The one you'll be interested in is the SpaceRTS folder. The others are external libraries used by SpaceRTS. Farseer Physics is for the physics engine, the Mercury Particle Engine is for all the pretty particle effects. Neoforce is for GUI elements. Open up the SpaceRTS folder and locate"SpaceRTS.sln". Double click to open it in Visual Studio 10. Right click on the project called SpaceRTS, and select "Set as Startup." This will make it so that the SpaceRTS project is the one that's run when you compile the game. Next, hit the little green arrow to run the game. If all goes well, the game should compile and run! Step 4: Committing Changes If you've changed the code, right click anywhere in the repository and select "Add files...". Add only source files and assets (like images, sounds, particle effects, etc.) NEVER add binary files (like .exe files or .dll files). After you've added any new files you created to the repository, right click again and select "Commit..." This will make it so that your local repository registers changes you've made. After you commit, right click again and select "Push..." this will make your local repository the same as the server's repository. This is an extremely loose overview of Hg. If you run into trouble, please read a tutorial from TortoiseHg, or the one Duncan posted on gamecreation.org, especially if you run into merge conflicts. Category:Tutorials